package com.edgclub.edg.api.param;

import android.text.TextUtils;

import com.edgclub.edg.http.param.Params;
import com.edgclub.edg.utils.util.CryptUtil;

import java.util.TreeMap;

public class TraceParam extends Params {

	private String lat;
	private String lon;
	private String gzno;
	private String userId;
	private String sex;
	private String province;
	private String city;
	private String locateProv;
	private String locateCity;

	@Override
	public TreeMap<String, String> getParams() {
		params = simpleParams();
		if (null != lat && !TextUtils.isEmpty(lat)) {
			params.put("lat", lat);
		}
		if (null != lon && !TextUtils.isEmpty(lon)) {
			params.put("lon", lon);
		}
		if (null != gzno && !TextUtils.isEmpty(gzno)) {
			params.put("gzno", gzno);
		}
		if (null != lat && !TextUtils.isEmpty(lat)) {
			params.put("userId", userId);
		}
		if (null != sex && !TextUtils.isEmpty(sex)) {
			params.put("sex", sex);
		}
		if (null != province && !TextUtils.isEmpty(province)) {
			params.put("province", province);
		}
		if (null != city && !TextUtils.isEmpty(city)) {
			params.put("city", city);
		}
		if (null != locateProv && !TextUtils.isEmpty(locateProv)) {
			params.put("locateProv", locateProv);
		}
		if (null != locateCity && !TextUtils.isEmpty(locateCity)) {
			params.put("locateCity", locateCity);
		}

		params.put("sign", CryptUtil.md5(convertParam()));
		return params;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getLon() {
		return lon;
	}

	public void setLon(String lon) {
		this.lon = lon;
	}

	public String getGzno() {
		return gzno;
	}

	public void setGzno(String gzno) {
		this.gzno = gzno;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getLocateProv() {
		return locateProv;
	}

	public void setLocateProv(String locateProv) {
		this.locateProv = locateProv;
	}

	public String getLocateCity() {
		return locateCity;
	}

	public void setLocateCity(String locateCity) {
		this.locateCity = locateCity;
	}

	
}
